/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;
import java.util.Date;
import java.io.Serializable;
import javax.persistence.Entity;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author ashwin
 */
@Entity
@Table(name = "userdata")
public class UserData implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
@ManyToOne(cascade = CascadeType.ALL)
private Location location;
@Column(name="cause")
private String cause;

    public void setCause(String cause) {
        this.cause = cause;
    }

    public void setFollowerId(String followerId) {
        this.followerId = followerId;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public void setRevival(Date revival) {
        this.revival = revival;
    }

    public void setSystemTime(Date systemTime) {
        this.systemTime = systemTime;
    }

    public void setUserTime(Date userTime) {
        this.userTime = userTime;
    }

    public String getCause() {
        return cause;
    }

    public String getFollowerId() {
        return followerId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Location getLocation() {
        return location;
    }

    public Date getRevival() {
        return revival;
    }

    public Date getSystemTime() {
        return systemTime;
    }

    public Date getUserTime() {
        return userTime;
    }
@Temporal(TemporalType.TIME)
@Column(name="usertime")
private Date userTime;
@Column(name="revival")
@Temporal(TemporalType.TIME)
private Date revival;
@Column(name="followerid")
String followerId;
@Temporal(TemporalType.DATE)
@Column(name="systemtime")
Date systemTime;


}
